<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<c:choose>
<%-- 
	로그인이 되었을때 기본 적인 로직이 수행되고 
	로그인이 안되었을 때는 로그인을 수행하도록 페이지를 이동한다.
--%>
	<c:when test="${sessionScope.mvo!=null}">
		<c:choose>
			<c:when test="${sessionScope.mvo.membertype=='t' }">
				<script type="text/javascript">
					location.href="profileTeacher.do?id=${sessionScope.mvo.id }"+
						"&membertype=${sessionScope.mvo.membertype}";
				</script>
			</c:when>
			<c:otherwise>
				<script type="text/javascript">
					location.href="profileStudent.do?id=${sessionScope.mvo.id }"+
					"&membertype=${sessionScope.mvo.membertype}";
				</script>
			</c:otherwise>
		</c:choose>
    </c:when>
	<c:otherwise>
				<script type="text/javascript">
					var path ="/mypage.do";
					location.href="loginResult.do?path="+path;
				</script>
	</c:otherwise>
</c:choose>